package com.jr.service.impl;


import com.jr.entity.Enterprise;
import com.jr.mapper.EnterpriseMapper;
import com.jr.service.EnterpriseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;

@Service
public class EnterpriseServiceImpl implements EnterpriseService {
  @Autowired
    private EnterpriseMapper enterpriseMapper;
    @Override
    public Enterprise selectEByEid(Integer eid) {
        ArrayList<Enterprise> enterprises = enterpriseMapper.selectEByEid(eid);
        if (enterprises.size()>0){
            return enterprises.get(0);
        }
        else {
        return null;

        }
    }


}
